using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using ICP_MS.Plugin.HPLC.Properties;

namespace ICP_MS.Plugin.HPLC;

public class FormNumerics : Form
{
	private ExperimentDatas experiment = null;

	private ExperimentDB db = null;

	private DataTable dtConcentration = new DataTable();

	private DataTable dtUncorrectedICPS = new DataTable();

	private DataTable dtAnalyteICPS = new DataTable();

	private DataTable dtRatio = new DataTable();

	private bool concLoad = false;

	private bool uncpsLoad = false;

	private bool cpsLoad = false;

	private volatile bool isInRefresh = false;

	private List<Point> ptExclude = new List<Point>();

	private IContainer components = null;

	private TabControl tabNumeric;

	private TabPage pageAnalyteConcentration;

	private TabPage pageUncorrectICPS;

	private TabPage pageAnalyteICPS;

	private ToolStrip toolStrip1;

	private ToolStripButton tsbtnRefresh;

	private ToolStripSeparator toolStripSeparator1;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;

	private RowMergeView dgvUncorrectedICPS;

	private RowMergeView dgvAnalyteICPS;

	private RowMergeView dgvAnalyteConcentrations;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;

	private ToolStripSplitButton tsbtnSaveResult;

	private ToolStripMenuItem tsmiUCPS;

	private ToolStripMenuItem tsmiCPS;

	private ToolStripMenuItem tsmiCONC;

	private TabPage pageRatio;

	private RowMergeView dgvRatio;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;

	private ToolStripButton tsbtnDatas;

	private ToolStripMenuItem tsmiSpectrum;

	public FormNumerics()
	{
		InitializeComponent();
	}

	public void SetParams(ExperimentDatas experiment, ExperimentDB db)
	{
		this.experiment = experiment;
		this.db = db;
	}

	public void UpdateSelectedIsotopes(object sender, EventArgs e)
	{
	}

	public void UpdateInternalStandards(object sender, EventArgs e)
	{
	}

	public void UpdateSamples(object sender, EventArgs e)
	{
	}

	private void InitConcentration()
	{
		SetupAnalyteConcentrationHeader();
		AssignConcentration();
		SetupAnalyteConcentrationDatas();
	}

	private void SetupAnalyteConcentrationHeader()
	{
		dtConcentration.Columns.Clear();
		dtConcentration.Columns.Add("sample");
		DataColumn column = dtConcentration.Columns.Add("header");
		column.ColumnMapping = MappingType.Hidden;
		foreach (IsotopeInfos isotope in experiment.Isotopes)
		{
			if (isotope.isInterference)
			{
				continue;
			}
			foreach (HPLCIntegerRegions region in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope.symbol))
			{
				if (!dtConcentration.Columns.Contains(region.Label))
				{
					DataColumn dc = dtConcentration.Columns.Add(region.Label, typeof(double));
					if (isotope.inter)
					{
						dc.ExtendedProperties.Add(true, true);
					}
					else
					{
						dc.ExtendedProperties.Clear();
					}
					if (!isotope.visible)
					{
						dc.ColumnMapping = MappingType.Hidden;
					}
				}
			}
		}
	}

	private void SetupAnalyteConcentrationDatas()
	{
		dtConcentration.Rows.Clear();
		foreach (SamplesInfos sample in experiment.Samples)
		{
			if (sample.status == 0 || !sample.report)
			{
				continue;
			}
			DataRow rowEmpty = dtConcentration.NewRow();
			rowEmpty["header"] = "";
			rowEmpty["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
			foreach (IsotopeInfos isotope3 in experiment.Isotopes)
			{
				if (isotope3.isInterference)
				{
					continue;
				}
				foreach (HPLCIntegerRegions region3 in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope3.symbol))
				{
					rowEmpty[region3.Label] = -1;
				}
			}
			dtConcentration.Rows.Add(rowEmpty);
			if (experiment.ReportParams.ShowRuns)
			{
				for (int i = 0; i < sample.mains; i++)
				{
					DataRow row = dtConcentration.NewRow();
					row["header"] = i + 1;
					row["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
					foreach (IsotopeInfos isotope2 in experiment.Isotopes)
					{
						if (isotope2.isInterference)
						{
							continue;
						}
						foreach (HPLCIntegerRegions region2 in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope2.symbol))
						{
							IEnumerable<HPLCAnalyseInfos> value = experiment.Results.Where((HPLCAnalyseInfos result) => result.sampleId == sample.guid && result.symbol == isotope2.symbol && result.regionLabel == region2.ReferenceId && result.number == i);
							if (value.Count() > 0)
							{
								row[region2.Label] = value.First().concentration;
							}
						}
					}
					dtConcentration.Rows.Add(row);
				}
			}
			DataRow r1 = dtConcentration.NewRow();
			r1["header"] = "χ";
			r1["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
			DataRow r2 = dtConcentration.NewRow();
			r2["header"] = "σ";
			r2["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
			DataRow r3 = dtConcentration.NewRow();
			r3["header"] = "%RSD";
			r3["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
			foreach (IsotopeInfos isotope in experiment.Isotopes)
			{
				if (isotope.isInterference)
				{
					continue;
				}
				foreach (HPLCIntegerRegions region in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope.symbol))
				{
					HPLCStatisticResults stat = experiment.Statistics.Where((HPLCStatisticResults statistic) => statistic.sampleId == sample.guid && statistic.regionLabel == region.ReferenceId && statistic.symbol == isotope.symbol).First();
					r1[region.Label] = stat.avgCon;
					r2[region.Label] = stat.sdCon;
					r3[region.Label] = stat.rsdCon;
				}
			}
			if (experiment.ReportParams.ShowMean)
			{
				dtConcentration.Rows.Add(r1);
			}
			if (experiment.ReportParams.ShowSd)
			{
				dtConcentration.Rows.Add(r2);
			}
			if (experiment.ReportParams.ShowRsd)
			{
				dtConcentration.Rows.Add(r3);
			}
		}
		Invoke((MethodInvoker)delegate
		{
			((Control)(object)dgvAnalyteConcentrations).Refresh();
		});
	}

	private void AssignConcentration()
	{
		((DataGridView)(object)dgvAnalyteConcentrations).DataSource = null;
		((DataGridView)(object)dgvAnalyteConcentrations).DataSource = dtConcentration;
		foreach (IsotopeInfos isotope in experiment.Isotopes)
		{
			if (!isotope.visible || isotope.isInterference)
			{
				continue;
			}
			foreach (HPLCIntegerRegions region in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope.symbol))
			{
				if (isotope.inter && ((DataGridView)(object)dgvAnalyteConcentrations).Columns.Contains(region.Label))
				{
					((DataGridView)(object)dgvAnalyteConcentrations).Columns[region.Label].DefaultCellStyle.BackColor = Color.Yellow;
				}
				else
				{
					((DataGridView)(object)dgvAnalyteConcentrations).Columns[region.Label].DefaultCellStyle.BackColor = Color.FromKnownColor(KnownColor.Control);
				}
			}
		}
		((DataGridView)(object)dgvAnalyteConcentrations).Columns["sample"].HeaderText = Lang.Txt("FormNumerics.Columns.SampleName.Text");
		((DataGridView)(object)dgvAnalyteConcentrations).Columns["sample"].Width = 90;
		((DataGridView)(object)dgvAnalyteConcentrations).Columns["sample"].Frozen = true;
		foreach (DataGridViewColumn column in ((DataGridView)(object)dgvAnalyteConcentrations).Columns)
		{
			column.SortMode = DataGridViewColumnSortMode.NotSortable;
		}
	}

	private void InitUncorrectedICPS()
	{
		SetupUncorrectedICPSHeader();
		AssignUncorrectedICPS();
		SetupUncorrectedICPSDatas();
	}

	private void SetupUncorrectedICPSHeader()
	{
		dtUncorrectedICPS.Columns.Clear();
		dtUncorrectedICPS.Columns.Add("sample");
		DataColumn column = dtUncorrectedICPS.Columns.Add("header");
		column.ColumnMapping = MappingType.Hidden;
		foreach (IsotopeInfos isotope in experiment.Isotopes)
		{
			if (isotope.isInterference)
			{
				continue;
			}
			foreach (HPLCIntegerRegions region in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope.symbol))
			{
				if (!dtUncorrectedICPS.Columns.Contains(region.Label))
				{
					DataColumn dc = dtUncorrectedICPS.Columns.Add(region.Label, typeof(double));
					if (isotope.inter)
					{
						dc.ExtendedProperties.Add(true, true);
					}
					else
					{
						dc.ExtendedProperties.Clear();
					}
					if (!isotope.visible)
					{
						dc.ColumnMapping = MappingType.Hidden;
					}
				}
			}
		}
	}

	private void SetupUncorrectedICPSDatas()
	{
		dtUncorrectedICPS.Rows.Clear();
		int currentRow = -1;
		ptExclude.Clear();
		foreach (SamplesInfos sample in experiment.Samples)
		{
			if (sample.status == 0 || !sample.report)
			{
				continue;
			}
			DataRow rowEmpty = dtUncorrectedICPS.NewRow();
			rowEmpty["header"] = "";
			rowEmpty["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
			foreach (IsotopeInfos isotope3 in experiment.Isotopes)
			{
				if (isotope3.isInterference)
				{
					continue;
				}
				foreach (HPLCIntegerRegions region3 in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope3.symbol))
				{
					rowEmpty[region3.Label] = -1;
				}
			}
			dtUncorrectedICPS.Rows.Add(rowEmpty);
			currentRow++;
			if (experiment.ReportParams.ShowRuns)
			{
				for (int i = 0; i < sample.mains; i++)
				{
					DataRow row = dtUncorrectedICPS.NewRow();
					row["header"] = i + 1;
					row["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
					int currentCol = 0;
					foreach (IsotopeInfos isotope2 in experiment.Isotopes)
					{
						if (isotope2.isInterference)
						{
							continue;
						}
						foreach (HPLCIntegerRegions region2 in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope2.symbol))
						{
							IEnumerable<HPLCAnalyseInfos> value = experiment.Results.Where((HPLCAnalyseInfos result) => result.sampleId == sample.guid && result.regionLabel == region2.ReferenceId && result.symbol == isotope2.symbol && result.number == i);
							row[region2.Label] = value.First().intensity;
							if (value.First().exclude)
							{
								ptExclude.Add(new Point(currentRow + 1, currentCol + 1));
							}
							currentCol++;
						}
					}
					dtUncorrectedICPS.Rows.Add(row);
					currentRow++;
				}
			}
			DataRow r1 = dtUncorrectedICPS.NewRow();
			r1["header"] = "χ";
			r1["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
			DataRow r2 = dtUncorrectedICPS.NewRow();
			r2["header"] = "σ";
			r2["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
			DataRow r3 = dtUncorrectedICPS.NewRow();
			r3["header"] = "%RSD";
			r3["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
			foreach (IsotopeInfos isotope in experiment.Isotopes)
			{
				if (isotope.isInterference)
				{
					continue;
				}
				foreach (HPLCIntegerRegions region in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope.symbol))
				{
					HPLCStatisticResults stat = experiment.Statistics.Where((HPLCStatisticResults statistic) => statistic.sampleId == sample.guid && statistic.regionLabel == region.ReferenceId && statistic.symbol == isotope.symbol).First();
					r1[region.Label] = stat.avgUICPS;
					r2[region.Label] = stat.sdUICPS;
					r3[region.Label] = stat.rsdUICPS;
				}
			}
			if (experiment.ReportParams.ShowMean)
			{
				dtUncorrectedICPS.Rows.Add(r1);
				currentRow++;
			}
			if (experiment.ReportParams.ShowSd)
			{
				dtUncorrectedICPS.Rows.Add(r2);
				currentRow++;
			}
			if (experiment.ReportParams.ShowRsd)
			{
				dtUncorrectedICPS.Rows.Add(r3);
				currentRow++;
			}
		}
		if (currentRow != -1)
		{
			Invoke((MethodInvoker)delegate
			{
				((DataGridView)(object)dgvUncorrectedICPS).CurrentCell = ((DataGridView)(object)dgvUncorrectedICPS).Rows[currentRow].Cells[0];
			});
		}
	}

	private void AssignUncorrectedICPS()
	{
		((DataGridView)(object)dgvUncorrectedICPS).DataSource = null;
		((DataGridView)(object)dgvUncorrectedICPS).DataSource = dtUncorrectedICPS;
		foreach (IsotopeInfos isotope in experiment.Isotopes)
		{
			if (!isotope.visible || isotope.isInterference)
			{
				continue;
			}
			foreach (HPLCIntegerRegions region in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope.symbol))
			{
				if (isotope.inter && ((DataGridView)(object)dgvUncorrectedICPS).Columns.Contains(region.Label))
				{
					((DataGridView)(object)dgvUncorrectedICPS).Columns[region.Label].DefaultCellStyle.BackColor = Color.Yellow;
				}
				else
				{
					((DataGridView)(object)dgvUncorrectedICPS).Columns[region.Label].DefaultCellStyle.BackColor = Color.FromKnownColor(KnownColor.Control);
				}
			}
		}
		((DataGridView)(object)dgvUncorrectedICPS).Columns["sample"].HeaderText = Lang.Txt("FormNumerics.Columns.SampleName.Text");
		((DataGridView)(object)dgvUncorrectedICPS).Columns["sample"].Width = 90;
		((DataGridView)(object)dgvUncorrectedICPS).Columns["sample"].Frozen = true;
		foreach (DataGridViewColumn column in ((DataGridView)(object)dgvUncorrectedICPS).Columns)
		{
			column.SortMode = DataGridViewColumnSortMode.NotSortable;
		}
	}

	private void InitAnalyteICPS()
	{
		SetupAnalyteICPSHeader();
		AssignAnalyteICPS();
		SetupAnalyteICPSDatas();
	}

	private void SetupAnalyteICPSHeader()
	{
		dtAnalyteICPS.Columns.Clear();
		dtAnalyteICPS.Columns.Add("sample");
		DataColumn column = dtAnalyteICPS.Columns.Add("header");
		column.ColumnMapping = MappingType.Hidden;
		foreach (IsotopeInfos isotope in experiment.Isotopes)
		{
			if (isotope.isInterference)
			{
				continue;
			}
			foreach (HPLCIntegerRegions region in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope.symbol))
			{
				if (!dtAnalyteICPS.Columns.Contains(region.Label))
				{
					DataColumn dc = dtAnalyteICPS.Columns.Add(region.Label, typeof(double));
					if (isotope.inter)
					{
						dc.ExtendedProperties.Add(true, true);
					}
					else
					{
						dc.ExtendedProperties.Clear();
					}
					if (!isotope.visible)
					{
						dc.ColumnMapping = MappingType.Hidden;
					}
				}
			}
		}
	}

	private void SetupAnalyteICPSDatas()
	{
		dtAnalyteICPS.Rows.Clear();
		foreach (SamplesInfos sample in experiment.Samples)
		{
			if (sample.status == 0 || !sample.report)
			{
				continue;
			}
			DataRow rowEmpty = dtAnalyteICPS.NewRow();
			rowEmpty["header"] = "";
			rowEmpty["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
			foreach (IsotopeInfos isotope3 in experiment.Isotopes)
			{
				if (isotope3.isInterference)
				{
					continue;
				}
				foreach (HPLCIntegerRegions region3 in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope3.symbol))
				{
					rowEmpty[region3.Label] = -1;
				}
			}
			dtAnalyteICPS.Rows.Add(rowEmpty);
			if (experiment.ReportParams.ShowRuns)
			{
				for (int i = 0; i < sample.mains; i++)
				{
					DataRow row = dtAnalyteICPS.NewRow();
					row["header"] = i + 1;
					row["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
					foreach (IsotopeInfos isotope2 in experiment.Isotopes)
					{
						if (isotope2.isInterference)
						{
							continue;
						}
						foreach (HPLCIntegerRegions region2 in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope2.symbol))
						{
							IEnumerable<HPLCAnalyseInfos> value = experiment.Results.Where((HPLCAnalyseInfos result) => result.sampleId == sample.guid && result.regionLabel == region2.ReferenceId && result.symbol == isotope2.symbol && result.number == i);
							row[region2.Label] = value.First().icps;
						}
					}
					dtAnalyteICPS.Rows.Add(row);
				}
			}
			DataRow r1 = dtAnalyteICPS.NewRow();
			r1["header"] = "χ";
			r1["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
			DataRow r2 = dtAnalyteICPS.NewRow();
			r2["header"] = "σ";
			r2["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
			DataRow r3 = dtAnalyteICPS.NewRow();
			r3["header"] = "%RSD";
			r3["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
			foreach (IsotopeInfos isotope in experiment.Isotopes)
			{
				if (isotope.isInterference)
				{
					continue;
				}
				foreach (HPLCIntegerRegions region in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope.symbol))
				{
					HPLCStatisticResults stat = experiment.Statistics.Where((HPLCStatisticResults statistic) => statistic.sampleId == sample.guid && statistic.regionLabel == region.ReferenceId && statistic.symbol == isotope.symbol).First();
					r1[region.Label] = stat.avgCPS;
					r2[region.Label] = stat.sdCPS;
					r3[region.Label] = stat.rsdCPS;
				}
			}
			if (experiment.ReportParams.ShowMean)
			{
				dtAnalyteICPS.Rows.Add(r1);
			}
			if (experiment.ReportParams.ShowSd)
			{
				dtAnalyteICPS.Rows.Add(r2);
			}
			if (experiment.ReportParams.ShowRsd)
			{
				dtAnalyteICPS.Rows.Add(r3);
			}
		}
	}

	private void AssignAnalyteICPS()
	{
		((DataGridView)(object)dgvAnalyteICPS).DataSource = null;
		((DataGridView)(object)dgvAnalyteICPS).DataSource = dtAnalyteICPS;
		foreach (IsotopeInfos isotope in experiment.Isotopes)
		{
			if (!isotope.visible || isotope.isInterference)
			{
				continue;
			}
			foreach (HPLCIntegerRegions region in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope.symbol))
			{
				if (isotope.inter && ((DataGridView)(object)dgvAnalyteICPS).Columns.Contains(region.Label))
				{
					((DataGridView)(object)dgvAnalyteICPS).Columns[region.Label].DefaultCellStyle.BackColor = Color.Yellow;
				}
				else
				{
					((DataGridView)(object)dgvAnalyteICPS).Columns[region.Label].DefaultCellStyle.BackColor = Color.FromKnownColor(KnownColor.Control);
				}
			}
		}
		((DataGridView)(object)dgvAnalyteICPS).Columns["sample"].HeaderText = Lang.Txt("FormNumerics.Columns.SampleName.Text");
		((DataGridView)(object)dgvAnalyteICPS).Columns["sample"].Width = 90;
		((DataGridView)(object)dgvAnalyteICPS).Columns["sample"].Frozen = true;
		foreach (DataGridViewColumn column in ((DataGridView)(object)dgvAnalyteICPS).Columns)
		{
			column.SortMode = DataGridViewColumnSortMode.NotSortable;
		}
	}

	private void InitRatios()
	{
		SetupRatioHeader();
		AssignRatios();
		SetupRatioDatas();
	}

	private void UpdateRatios()
	{
		UpdateRatioHeader();
		SetupRatioDatas();
	}

	private void SetupRatioHeader()
	{
		dtRatio.Columns.Clear();
		dtRatio.Columns.Add("sample");
		DataColumn column = dtRatio.Columns.Add("header");
		column.ColumnMapping = MappingType.Hidden;
		foreach (IsotopeRatio isotope in experiment.Ratios)
		{
			dtRatio.Columns.Add(isotope.Name, typeof(double));
		}
	}

	private void UpdateRatioHeader()
	{
		while (dtRatio.Columns.Count > 2)
		{
			dtRatio.Columns.RemoveAt(dtRatio.Columns.Count - 1);
		}
		foreach (IsotopeRatio isotope in experiment.Ratios)
		{
			dtRatio.Columns.Add(isotope.Name, typeof(double));
		}
		foreach (DataGridViewColumn column in ((DataGridView)(object)dgvRatio).Columns)
		{
			column.SortMode = DataGridViewColumnSortMode.NotSortable;
		}
	}

	private void SetupRatioDatas()
	{
		dtRatio.Rows.Clear();
		int currentRow = -1;
		foreach (SamplesInfos sample in experiment.Samples)
		{
			if (sample.status == 0)
			{
				continue;
			}
			DataRow rowEmpty = dtRatio.NewRow();
			rowEmpty["header"] = "";
			rowEmpty["sample"] = sample.label + "\n" + sample.time.ToString("dd/MM HH:mm");
			foreach (IsotopeRatio isotope3 in experiment.Ratios)
			{
				rowEmpty[isotope3.Name] = -1;
			}
			dtRatio.Rows.Add(rowEmpty);
			for (int i = 0; i < sample.mains; i++)
			{
				DataRow row = dtRatio.NewRow();
				row["header"] = i + 1;
				row["sample"] = sample.label + "\n" + sample.time.ToString();
				foreach (IsotopeRatio isotope2 in experiment.Ratios)
				{
					IEnumerable<RatioResults> value = experiment.RatioResults.Where((RatioResults result) => result.SampleId == sample.guid && result.Name == isotope2.Name && result.Number == i);
					row[isotope2.Name] = value.First().Result;
				}
				dtRatio.Rows.Add(row);
				currentRow++;
			}
			DataRow r1 = dtRatio.NewRow();
			r1["header"] = "χ";
			r1["sample"] = sample.label + "\n" + sample.time.ToString();
			DataRow r2 = dtRatio.NewRow();
			r2["header"] = "σ";
			r2["sample"] = sample.label + "\n" + sample.time.ToString();
			DataRow r3 = dtRatio.NewRow();
			r3["header"] = "%RSD";
			r3["sample"] = sample.label + "\n" + sample.time.ToString();
			foreach (IsotopeRatio isotope in experiment.Ratios)
			{
				RatioStatistics stat = experiment.RatioStat.Where((RatioStatistics statistic) => statistic.SampleId == sample.guid && statistic.Name == isotope.Name).First();
				r1[isotope.Name] = stat.Avg;
				r2[isotope.Name] = stat.Sd;
				r3[isotope.Name] = stat.Rsd;
			}
			dtRatio.Rows.Add(r1);
			dtRatio.Rows.Add(r2);
			dtRatio.Rows.Add(r3);
			currentRow += 3;
		}
		if (currentRow != -1)
		{
			Invoke((MethodInvoker)delegate
			{
				((DataGridView)(object)dgvRatio).CurrentCell = ((DataGridView)(object)dgvRatio).Rows[currentRow].Cells[0];
			});
		}
	}

	private void AssignRatios()
	{
		((DataGridView)(object)dgvRatio).DataSource = null;
		((DataGridView)(object)dgvRatio).DataSource = dtRatio;
		((DataGridView)(object)dgvRatio).Columns["sample"].HeaderText = Lang.Txt("FormNumerics.Columns.SampleName.Text");
		((DataGridView)(object)dgvRatio).Columns["sample"].Width = 90;
		foreach (DataGridViewColumn column in ((DataGridView)(object)dgvRatio).Columns)
		{
			column.SortMode = DataGridViewColumnSortMode.NotSortable;
		}
	}

	private void FormNumerics_Load(object sender, EventArgs e)
	{
		base.WindowState = FormWindowState.Maximized;
		InitConcentration();
		InitUncorrectedICPS();
		InitAnalyteICPS();
		InitRatios();
		tsbtnSaveResult.DefaultItem = tsmiCONC;
		ApplyResources();
	}

	private void ApplyResources()
	{
		tsbtnDatas.Text = Lang.Txt("FormNumerics.Edit.Text");
		tsbtnRefresh.Text = Lang.Txt("FormNumerics.Refresh.Text");
		tsbtnSaveResult.Text = Lang.Txt("FormNumerics.Save.Text");
		tsmiCONC.Text = Lang.Txt("FormNumerics.Concentration.Text");
		tsmiCPS.Text = Lang.Txt("FormNumerics.CaliIntensity.Text");
		tsmiUCPS.Text = Lang.Txt("FormNumerics.OriIntensity.Text");
		pageAnalyteConcentration.Text = Lang.Txt("FormNumerics.Concentration.Text");
		pageAnalyteICPS.Text = Lang.Txt("FormNumerics.CaliIntensity.Text");
		pageRatio.Text = Lang.Txt("FormNumerics.Ratio.Text");
		pageUncorrectICPS.Text = Lang.Txt("FormNumerics.OriIntensity.Text");
		tsmiSpectrum.Text = Lang.Txt("FormScanLA.TimeSpectrogram");
	}

	private void RecalculatedAll()
	{
		experiment.RecalculatedAll();
	}

	private void tsbtnRefresh_Click(object sender, EventArgs e)
	{
		tsbtnRefresh.Enabled = false;
		FormWait wait = new FormWait();
		wait.StartPosition = FormStartPosition.CenterParent;
		wait.Text = Lang.Txt("FormNumerics.Calculate.Text");
		wait.Run += CalculateRun;
		wait.Complete += CalculateComplete;
		wait.Show();
	}

	private void CalculateRun(object sender, EventArgs e)
	{
		ProgressBar bar = sender as ProgressBar;
		if (bar != null)
		{
			Invoke((MethodInvoker)delegate
			{
				bar.Style = ProgressBarStyle.Marquee;
			});
		}
		experiment.RecalculatedAll();
	}

	private void CalculateComplete(object sender, EventArgs e)
	{
		Invoke((MethodInvoker)delegate
		{
			(sender as Form).Text = Lang.Txt("FormNumerics.RefreshData.Text");
			RefreshResults();
			tsbtnRefresh.Enabled = true;
		});
	}

	public void RefreshResults()
	{
		Invoke((MethodInvoker)delegate
		{
			if (!isInRefresh)
			{
				isInRefresh = true;
				InitConcentration();
				InitUncorrectedICPS();
				InitAnalyteICPS();
				InitRatios();
				isInRefresh = false;
			}
		});
	}

	private void dgvAnalyteConcentrations_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e)
	{
		((DataGridView)(object)dgvAnalyteConcentrations).Rows[e.RowIndex].HeaderCell.Value = dtConcentration.Rows[e.RowIndex]["header"];
		((DataGridView)(object)dgvAnalyteConcentrations).RowHeadersWidth = 60;
		if (dtConcentration.Rows[e.RowIndex]["header"] == "χ" || dtConcentration.Rows[e.RowIndex]["header"] == "σ" || dtConcentration.Rows[e.RowIndex]["header"] == "%RSD")
		{
			((DataGridView)(object)dgvAnalyteConcentrations).Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.FromKnownColor(KnownColor.PaleTurquoise);
		}
	}

	private void dgvUncorrectedICPS_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
	{
		((DataGridView)(object)dgvUncorrectedICPS).Rows[e.RowIndex].HeaderCell.Value = dtUncorrectedICPS.Rows[e.RowIndex]["header"];
		((DataGridView)(object)dgvUncorrectedICPS).RowHeadersWidth = 60;
		if (dtUncorrectedICPS.Rows[e.RowIndex]["header"] == "χ" || dtUncorrectedICPS.Rows[e.RowIndex]["header"] == "σ" || dtUncorrectedICPS.Rows[e.RowIndex]["header"] == "%RSD")
		{
			((DataGridView)(object)dgvUncorrectedICPS).Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.FromKnownColor(KnownColor.PaleTurquoise);
		}
	}

	private void dgvAnalyteICPS_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
	{
		((DataGridView)(object)dgvAnalyteICPS).Rows[e.RowIndex].HeaderCell.Value = dtAnalyteICPS.Rows[e.RowIndex]["header"];
		((DataGridView)(object)dgvAnalyteICPS).RowHeadersWidth = 60;
		if (dtAnalyteICPS.Rows[e.RowIndex]["header"] == "χ" || dtAnalyteICPS.Rows[e.RowIndex]["header"] == "σ" || dtAnalyteICPS.Rows[e.RowIndex]["header"] == "%RSD")
		{
			((DataGridView)(object)dgvAnalyteICPS).Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.FromKnownColor(KnownColor.PaleTurquoise);
		}
	}

	private void dgvUncorrectedICPS_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
	{
		if (e.ColumnIndex > 0)
		{
			if (e.Value.Equals(-1))
			{
				e.Value = null;
			}
			else
			{
				e.Value = string.Format(new FormatValue(), "{0:U}", e.Value);
			}
			if (dtUncorrectedICPS.Rows[e.RowIndex]["header"] == "χ")
			{
				e.CellStyle.ForeColor = Color.Blue;
				e.CellStyle.Font = new Font(new FontFamily("SimSun"), 9f, FontStyle.Bold);
			}
			else if (dtUncorrectedICPS.Rows[e.RowIndex]["header"] == "σ" || dtUncorrectedICPS.Rows[e.RowIndex]["header"] == "%RSD")
			{
				e.CellStyle.ForeColor = Color.Blue;
			}
			else if (ptExclude.Contains(new Point(e.RowIndex, e.ColumnIndex)))
			{
				e.CellStyle.ForeColor = Color.Red;
			}
			else
			{
				e.CellStyle.ForeColor = Color.Black;
			}
		}
	}

	private void dgvAnalyteConcentrations_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
	{
		if (e.ColumnIndex > 0)
		{
			e.Value = string.Format(new FormatValue(), "{0:U}", e.Value);
			if (dtConcentration.Rows[e.RowIndex]["header"] == "χ")
			{
				e.CellStyle.ForeColor = Color.Blue;
				e.CellStyle.Font = new Font(new FontFamily("SimSun"), 9f, FontStyle.Bold);
			}
			else if (dtConcentration.Rows[e.RowIndex]["header"] == "σ" || dtConcentration.Rows[e.RowIndex]["header"] == "%RSD")
			{
				e.CellStyle.ForeColor = Color.Blue;
			}
			else if (ptExclude.Contains(new Point(e.RowIndex, e.ColumnIndex)))
			{
				e.CellStyle.ForeColor = Color.Red;
			}
			else
			{
				e.CellStyle.ForeColor = Color.Black;
			}
		}
	}

	private void dgvAnalyteICPS_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
	{
		if (e.ColumnIndex > 0)
		{
			e.Value = string.Format(new FormatValue(), "{0:U}", e.Value);
			if (dtAnalyteICPS.Rows[e.RowIndex]["header"] == "χ")
			{
				e.CellStyle.ForeColor = Color.Blue;
				e.CellStyle.Font = new Font(new FontFamily("SimSun"), 9f, FontStyle.Bold);
			}
			else if (dtAnalyteICPS.Rows[e.RowIndex]["header"] == "σ" || dtAnalyteICPS.Rows[e.RowIndex]["header"] == "%RSD")
			{
				e.CellStyle.ForeColor = Color.Blue;
			}
			else if (ptExclude.Contains(new Point(e.RowIndex, e.ColumnIndex)))
			{
				e.CellStyle.ForeColor = Color.Red;
			}
			else
			{
				e.CellStyle.ForeColor = Color.Black;
			}
		}
	}

	private void tsmiUCPS_Click(object sender, EventArgs e)
	{
		SaveFileDialog dlg = new SaveFileDialog();
		dlg.Title = Lang.Txt("FormNumerics.SaveOriIntensity.Text");
		dlg.Filter = "Csv File(*.csv)|*.csv";
		if (dlg.ShowDialog() == DialogResult.OK)
		{
			string filename = dlg.FileName;
			ExportResults(filename, 1);
		}
	}

	private void tsmiCPS_Click(object sender, EventArgs e)
	{
		SaveFileDialog dlg = new SaveFileDialog();
		dlg.Title = Lang.Txt("FormNumerics.SaveCaliIntensity.Text");
		dlg.Filter = "Csv File(*.csv)|*.csv";
		if (dlg.ShowDialog() == DialogResult.OK)
		{
			string filename = dlg.FileName;
			ExportResults(filename, 2);
		}
	}

	private void tsmiCONC_Click(object sender, EventArgs e)
	{
		SaveFileDialog dlg = new SaveFileDialog();
		dlg.Title = Lang.Txt("FormNumerics.SaveConcentration.Text");
		dlg.Filter = "Csv File(*.csv)|*.csv";
		if (dlg.ShowDialog() == DialogResult.OK)
		{
			string filename = dlg.FileName;
			ExportResults(filename, 0);
		}
	}

	private void ExportResults(string filename, int type)
	{
		using StreamWriter sw = new StreamWriter(filename);
		try
		{
			sw.Write(" ");
			foreach (IsotopeInfos isotope5 in experiment.Isotopes)
			{
				foreach (HPLCIntegerRegions region5 in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope5.symbol))
				{
					sw.Write(",");
					sw.Write(region5.Label);
				}
			}
			sw.WriteLine();
			foreach (SamplesInfos sample in experiment.Samples)
			{
				if (sample.status != 1 || !sample.report)
				{
					continue;
				}
				sw.WriteLine();
				sw.WriteLine(sample.label);
				for (int i = 0; i < sample.mains; i++)
				{
					sw.Write(i + 1);
					foreach (IsotopeInfos isotope4 in experiment.Isotopes)
					{
						foreach (HPLCIntegerRegions region4 in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope4.symbol))
						{
							sw.Write(",");
							HPLCAnalyseInfos r4 = experiment.Results.Where((HPLCAnalyseInfos result) => result.sampleId == sample.guid && result.regionLabel == region4.ReferenceId && result.number == i && result.symbol == isotope4.symbol).First();
							switch (type)
							{
							case 0:
								sw.Write(r4.concentration);
								break;
							case 1:
								sw.Write(r4.intensity);
								break;
							case 2:
								sw.Write(r4.icps);
								break;
							}
						}
					}
					sw.WriteLine();
				}
				sw.Write("average");
				foreach (IsotopeInfos isotope3 in experiment.Isotopes)
				{
					foreach (HPLCIntegerRegions region3 in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope3.symbol))
					{
						sw.Write(",");
						HPLCStatisticResults r3 = experiment.Statistics.Where((HPLCStatisticResults result) => result.sampleId == sample.guid && result.regionLabel == region3.ReferenceId && result.symbol == isotope3.symbol).First();
						switch (type)
						{
						case 0:
							sw.Write(r3.avgCon);
							break;
						case 1:
							sw.Write(r3.avgUICPS);
							break;
						case 2:
							sw.Write(r3.avgCPS);
							break;
						}
					}
				}
				sw.WriteLine();
				sw.Write("deviation");
				foreach (IsotopeInfos isotope2 in experiment.Isotopes)
				{
					foreach (HPLCIntegerRegions region2 in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope2.symbol))
					{
						sw.Write(",");
						HPLCStatisticResults r2 = experiment.Statistics.Where((HPLCStatisticResults result) => result.sampleId == sample.guid && region2.ReferenceId == result.regionLabel && result.symbol == isotope2.symbol).First();
						switch (type)
						{
						case 0:
							sw.Write(r2.sdCon);
							break;
						case 1:
							sw.Write(r2.sdUICPS);
							break;
						case 2:
							sw.Write(r2.sdCPS);
							break;
						}
					}
				}
				sw.WriteLine();
				sw.Write("%RSD");
				foreach (IsotopeInfos isotope in experiment.Isotopes)
				{
					foreach (HPLCIntegerRegions region in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope.symbol))
					{
						sw.Write(",");
						HPLCStatisticResults r = experiment.Statistics.Where((HPLCStatisticResults result) => result.sampleId == sample.guid && result.regionLabel == region.ReferenceId && result.symbol == isotope.symbol).First();
						switch (type)
						{
						case 0:
							sw.Write(r.rsdCon);
							break;
						case 1:
							sw.Write(r.rsdUICPS);
							break;
						case 2:
							sw.Write(r.rsdCPS);
							break;
						}
					}
				}
				sw.WriteLine();
			}
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
	}

	private void dgvRatio_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
	{
		if (e.ColumnIndex > 0)
		{
			e.Value = string.Format(new FormatValue(), "{0:U}", e.Value);
			if (dtRatio.Rows[e.RowIndex]["header"] == "χ")
			{
				e.CellStyle.ForeColor = Color.Blue;
				e.CellStyle.Font = new Font(new FontFamily("SimSun"), 9f, FontStyle.Bold);
			}
			else if (dtRatio.Rows[e.RowIndex]["header"] == "σ" || dtRatio.Rows[e.RowIndex]["header"] == "%RSD")
			{
				e.CellStyle.ForeColor = Color.Blue;
			}
		}
	}

	private void dgvRatio_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
	{
		((DataGridView)(object)dgvRatio).Rows[e.RowIndex].HeaderCell.Value = dtRatio.Rows[e.RowIndex]["header"];
		((DataGridView)(object)dgvRatio).RowHeadersWidth = 60;
	}

	private void Results_SetExclude(int rowIndex, int colIndex, bool exclude)
	{
		string regionlabel = dtUncorrectedICPS.Columns[colIndex + 1].ColumnName;
		int num = Convert.ToInt32(dtUncorrectedICPS.Rows[rowIndex]["header"]) - 1;
		int sampleId = 0;
		int indexCount = 0;
		foreach (SamplesInfos sample in experiment.Samples)
		{
			if (sample.report)
			{
				indexCount++;
				indexCount += sample.mains;
				indexCount++;
				indexCount += (experiment.ReportParams.ShowSd ? 1 : 0);
				indexCount += (experiment.ReportParams.ShowRsd ? 1 : 0);
				if (rowIndex < indexCount)
				{
					sampleId = sample.guid;
					break;
				}
			}
		}
		experiment.SetResultExclude(regionlabel, sampleId, num, exclude);
	}

	private void dgvUncorrectedICPS_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
	{
		if (e.Button == MouseButtons.Right && e.ColumnIndex > 0 && dtUncorrectedICPS.Rows[e.RowIndex]["header"] != "χ" && dtUncorrectedICPS.Rows[e.RowIndex]["header"] != "σ" && dtUncorrectedICPS.Rows[e.RowIndex]["header"] != "%RSD" && dtUncorrectedICPS.Rows[e.RowIndex]["header"] != "")
		{
			ContextMenu menu = new ContextMenu();
			menu.MenuItems.Add(Lang.Txt("FormNumerics.Include.Text"), delegate
			{
				Results_SetExclude(e.RowIndex, e.ColumnIndex, exclude: false);
				((Control)(object)dgvUncorrectedICPS).Refresh();
			});
			menu.MenuItems.Add(Lang.Txt("FormNumerics.Exclude.Text"), delegate
			{
				Results_SetExclude(e.RowIndex, e.ColumnIndex, exclude: true);
				((Control)(object)dgvUncorrectedICPS).Refresh();
			});
			Rectangle rect = ((DataGridView)(object)dgvUncorrectedICPS).GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, cutOverflow: false);
			Point pt = e.Location;
			pt.Offset(rect.X, rect.Y);
			menu.Show((Control)(object)dgvUncorrectedICPS, pt);
		}
	}

	private void dgvAnalyteICPS_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
	{
		if (e.Button == MouseButtons.Right && e.ColumnIndex > 0 && dtAnalyteICPS.Rows[e.RowIndex]["header"] != "χ" && dtAnalyteICPS.Rows[e.RowIndex]["header"] != "σ" && dtAnalyteICPS.Rows[e.RowIndex]["header"] != "%RSD" && dtAnalyteICPS.Rows[e.RowIndex]["header"] != "")
		{
			ContextMenu menu = new ContextMenu();
			menu.MenuItems.Add(Lang.Txt("FormNumerics.Include.Text"), delegate
			{
				Results_SetExclude(e.RowIndex, e.ColumnIndex, exclude: false);
				((Control)(object)dgvAnalyteICPS).Refresh();
			});
			menu.MenuItems.Add(Lang.Txt("FormNumerics.Exclude.Text"), delegate
			{
				Results_SetExclude(e.RowIndex, e.ColumnIndex, exclude: true);
				((Control)(object)dgvAnalyteICPS).Refresh();
			});
			Rectangle rect = ((DataGridView)(object)dgvAnalyteICPS).GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, cutOverflow: false);
			Point pt = e.Location;
			pt.Offset(rect.X, rect.Y);
			menu.Show((Control)(object)dgvAnalyteICPS, pt);
		}
	}

	private void dgvAnalyteConcentrations_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
	{
		if (e.Button == MouseButtons.Right && e.ColumnIndex > 0 && dtConcentration.Rows[e.RowIndex]["header"] != "χ" && dtConcentration.Rows[e.RowIndex]["header"] != "σ" && dtConcentration.Rows[e.RowIndex]["header"] != "%RSD")
		{
			ContextMenu menu = new ContextMenu();
			menu.MenuItems.Add(Lang.Txt("FormNumerics.Include.Text"), delegate
			{
				Results_SetExclude(e.RowIndex, e.ColumnIndex, exclude: false);
				((Control)(object)dgvAnalyteConcentrations).Refresh();
			});
			menu.MenuItems.Add(Lang.Txt("FormNumerics.Exclude.Text"), delegate
			{
				Results_SetExclude(e.RowIndex, e.ColumnIndex, exclude: true);
				((Control)(object)dgvAnalyteConcentrations).Refresh();
			});
			Rectangle rect = ((DataGridView)(object)dgvAnalyteConcentrations).GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, cutOverflow: false);
			Point pt = e.Location;
			pt.Offset(rect.X, rect.Y);
			menu.Show((Control)(object)dgvAnalyteConcentrations, pt);
		}
	}

	private void tsbtnDatas_Click(object sender, EventArgs e)
	{
		if (isInRefresh)
		{
			MessageBox.Show(Lang.Txt("FormNumerics.RefreshInfo.Text"));
			return;
		}
		isInRefresh = true;
		using FormShowdata dlg = new FormShowdata(experiment);
		dlg.ShowDialog();
		foreach (IsotopeInfos isotope in experiment.Isotopes)
		{
			if (isotope.isInterference)
			{
				continue;
			}
			foreach (HPLCIntegerRegions region in experiment.IntegerRegions.Where((HPLCIntegerRegions regions) => regions.symbol == isotope.symbol))
			{
				dtConcentration.Columns[region.Label].ColumnMapping = (isotope.visible ? MappingType.Element : MappingType.Hidden);
				dtAnalyteICPS.Columns[region.Label].ColumnMapping = (isotope.visible ? MappingType.Element : MappingType.Hidden);
				dtUncorrectedICPS.Columns[region.Label].ColumnMapping = (isotope.visible ? MappingType.Element : MappingType.Hidden);
			}
		}
		isInRefresh = false;
		tsbtnRefresh.PerformClick();
	}

	private void FormNumerics_FormClosing(object sender, FormClosingEventArgs e)
	{
	}

	private void tsmiSpectrum_Click(object sender, EventArgs e)
	{
		FolderBrowserDialog dlg = new FolderBrowserDialog();
		if (dlg.ShowDialog() != DialogResult.OK)
		{
			return;
		}
		try
		{
			string path = Path.Combine(dlg.SelectedPath, DateTime.Now.ToString("yyyy_MM_dd_hh_mm_ss"));
			Directory.CreateDirectory(path);
			foreach (HPLCTimeSpectrum spectrum in experiment.TimeSpectrums)
			{
				string filename = path + "//" + spectrum.Symbol + "_" + spectrum.SampleLabel + "_" + spectrum.RunIndex + ".csv";
				using StreamWriter sw = new StreamWriter(filename);
				sw.WriteLine("Time,Intesntiy");
				for (int i = 0; i < spectrum.Time.Count; i++)
				{
					sw.WriteLine("{0},{1}", spectrum.Time[i], spectrum.Intensity[i]);
				}
			}
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
	}

	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	private void InitializeComponent()
	{
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00eb: Expected O, but got Unknown
		//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f6: Expected O, but got Unknown
		//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0101: Expected O, but got Unknown
		//IL_0102: Unknown result type (might be due to invalid IL or missing references)
		//IL_010c: Expected O, but got Unknown
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
		System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ICP_MS.Plugin.HPLC.FormNumerics));
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
		this.tabNumeric = new System.Windows.Forms.TabControl();
		this.pageAnalyteConcentration = new System.Windows.Forms.TabPage();
		this.pageUncorrectICPS = new System.Windows.Forms.TabPage();
		this.pageAnalyteICPS = new System.Windows.Forms.TabPage();
		this.pageRatio = new System.Windows.Forms.TabPage();
		this.toolStrip1 = new System.Windows.Forms.ToolStrip();
		this.tsbtnRefresh = new System.Windows.Forms.ToolStripButton();
		this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
		this.tsbtnSaveResult = new System.Windows.Forms.ToolStripSplitButton();
		this.tsmiCONC = new System.Windows.Forms.ToolStripMenuItem();
		this.tsmiUCPS = new System.Windows.Forms.ToolStripMenuItem();
		this.tsmiCPS = new System.Windows.Forms.ToolStripMenuItem();
		this.tsmiSpectrum = new System.Windows.Forms.ToolStripMenuItem();
		this.tsbtnDatas = new System.Windows.Forms.ToolStripButton();
		this.dgvAnalyteConcentrations = new RowMergeView();
		this.dgvUncorrectedICPS = new RowMergeView();
		this.dgvAnalyteICPS = new RowMergeView();
		this.dgvRatio = new RowMergeView();
		this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.tabNumeric.SuspendLayout();
		this.pageAnalyteConcentration.SuspendLayout();
		this.pageUncorrectICPS.SuspendLayout();
		this.pageAnalyteICPS.SuspendLayout();
		this.pageRatio.SuspendLayout();
		this.toolStrip1.SuspendLayout();
		((System.ComponentModel.ISupportInitialize)this.dgvAnalyteConcentrations).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.dgvUncorrectedICPS).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.dgvAnalyteICPS).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.dgvRatio).BeginInit();
		base.SuspendLayout();
		this.tabNumeric.Alignment = System.Windows.Forms.TabAlignment.Bottom;
		this.tabNumeric.Controls.Add(this.pageAnalyteConcentration);
		this.tabNumeric.Controls.Add(this.pageUncorrectICPS);
		this.tabNumeric.Controls.Add(this.pageAnalyteICPS);
		this.tabNumeric.Controls.Add(this.pageRatio);
		this.tabNumeric.Dock = System.Windows.Forms.DockStyle.Fill;
		this.tabNumeric.Location = new System.Drawing.Point(0, 27);
		this.tabNumeric.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
		this.tabNumeric.Multiline = true;
		this.tabNumeric.Name = "tabNumeric";
		this.tabNumeric.RightToLeft = System.Windows.Forms.RightToLeft.No;
		this.tabNumeric.SelectedIndex = 0;
		this.tabNumeric.Size = new System.Drawing.Size(1096, 615);
		this.tabNumeric.TabIndex = 2;
		this.pageAnalyteConcentration.Controls.Add((System.Windows.Forms.Control)(object)this.dgvAnalyteConcentrations);
		this.pageAnalyteConcentration.Location = new System.Drawing.Point(4, 4);
		this.pageAnalyteConcentration.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
		this.pageAnalyteConcentration.Name = "pageAnalyteConcentration";
		this.pageAnalyteConcentration.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
		this.pageAnalyteConcentration.Size = new System.Drawing.Size(1088, 586);
		this.pageAnalyteConcentration.TabIndex = 0;
		this.pageAnalyteConcentration.Text = "计算浓度";
		this.pageAnalyteConcentration.UseVisualStyleBackColor = true;
		this.pageUncorrectICPS.Controls.Add((System.Windows.Forms.Control)(object)this.dgvUncorrectedICPS);
		this.pageUncorrectICPS.Location = new System.Drawing.Point(4, 4);
		this.pageUncorrectICPS.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
		this.pageUncorrectICPS.Name = "pageUncorrectICPS";
		this.pageUncorrectICPS.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
		this.pageUncorrectICPS.Size = new System.Drawing.Size(1088, 582);
		this.pageUncorrectICPS.TabIndex = 1;
		this.pageUncorrectICPS.Text = "原始强度";
		this.pageUncorrectICPS.UseVisualStyleBackColor = true;
		this.pageAnalyteICPS.Controls.Add((System.Windows.Forms.Control)(object)this.dgvAnalyteICPS);
		this.pageAnalyteICPS.Location = new System.Drawing.Point(4, 4);
		this.pageAnalyteICPS.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
		this.pageAnalyteICPS.Name = "pageAnalyteICPS";
		this.pageAnalyteICPS.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
		this.pageAnalyteICPS.Size = new System.Drawing.Size(1088, 582);
		this.pageAnalyteICPS.TabIndex = 2;
		this.pageAnalyteICPS.Text = "计算强度";
		this.pageAnalyteICPS.UseVisualStyleBackColor = true;
		this.pageRatio.Controls.Add((System.Windows.Forms.Control)(object)this.dgvRatio);
		this.pageRatio.Location = new System.Drawing.Point(4, 4);
		this.pageRatio.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
		this.pageRatio.Name = "pageRatio";
		this.pageRatio.Size = new System.Drawing.Size(1088, 582);
		this.pageRatio.TabIndex = 3;
		this.pageRatio.Text = "比率";
		this.pageRatio.UseVisualStyleBackColor = true;
		this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
		this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[4] { this.tsbtnRefresh, this.toolStripSeparator1, this.tsbtnSaveResult, this.tsbtnDatas });
		this.toolStrip1.Location = new System.Drawing.Point(0, 0);
		this.toolStrip1.Name = "toolStrip1";
		this.toolStrip1.Size = new System.Drawing.Size(1096, 27);
		this.toolStrip1.TabIndex = 3;
		this.toolStrip1.Text = "toolStrip1";
		this.tsbtnRefresh.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
		this.tsbtnRefresh.Image = ICP_MS.Plugin.HPLC.Properties.Resources.fresh;
		this.tsbtnRefresh.ImageTransparentColor = System.Drawing.Color.Magenta;
		this.tsbtnRefresh.Name = "tsbtnRefresh";
		this.tsbtnRefresh.Size = new System.Drawing.Size(29, 24);
		this.tsbtnRefresh.Text = "刷新";
		this.tsbtnRefresh.Click += new System.EventHandler(tsbtnRefresh_Click);
		this.toolStripSeparator1.Name = "toolStripSeparator1";
		this.toolStripSeparator1.Size = new System.Drawing.Size(6, 27);
		this.tsbtnSaveResult.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
		this.tsbtnSaveResult.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[4] { this.tsmiCONC, this.tsmiUCPS, this.tsmiCPS, this.tsmiSpectrum });
		this.tsbtnSaveResult.Image = ICP_MS.Plugin.HPLC.Properties.Resources.Save;
		this.tsbtnSaveResult.ImageTransparentColor = System.Drawing.Color.Magenta;
		this.tsbtnSaveResult.Name = "tsbtnSaveResult";
		this.tsbtnSaveResult.Size = new System.Drawing.Size(39, 24);
		this.tsbtnSaveResult.Text = "保存结果";
		this.tsmiCONC.Name = "tsmiCONC";
		this.tsmiCONC.Size = new System.Drawing.Size(224, 26);
		this.tsmiCONC.Text = "浓度";
		this.tsmiCONC.Click += new System.EventHandler(tsmiCONC_Click);
		this.tsmiUCPS.Name = "tsmiUCPS";
		this.tsmiUCPS.Size = new System.Drawing.Size(224, 26);
		this.tsmiUCPS.Text = "原始强度";
		this.tsmiUCPS.Click += new System.EventHandler(tsmiUCPS_Click);
		this.tsmiCPS.Name = "tsmiCPS";
		this.tsmiCPS.Size = new System.Drawing.Size(224, 26);
		this.tsmiCPS.Text = "校正强度";
		this.tsmiCPS.Click += new System.EventHandler(tsmiCPS_Click);
		this.tsmiSpectrum.Name = "tsmiSpectrum";
		this.tsmiSpectrum.Size = new System.Drawing.Size(224, 26);
		this.tsmiSpectrum.Text = "时间谱图";
		this.tsmiSpectrum.Click += new System.EventHandler(tsmiSpectrum_Click);
		this.tsbtnDatas.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
		this.tsbtnDatas.Image = ICP_MS.Plugin.HPLC.Properties.Resources.Edit;
		this.tsbtnDatas.ImageTransparentColor = System.Drawing.Color.Magenta;
		this.tsbtnDatas.Name = "tsbtnDatas";
		this.tsbtnDatas.Size = new System.Drawing.Size(29, 24);
		this.tsbtnDatas.Text = "设置显示数据";
		this.tsbtnDatas.Click += new System.EventHandler(tsbtnDatas_Click);
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteConcentrations).AllowUserToAddRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteConcentrations).AllowUserToDeleteRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteConcentrations).AllowUserToResizeRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteConcentrations).BackgroundColor = System.Drawing.SystemColors.Window;
		dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
		dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
		dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteConcentrations).ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteConcentrations).ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
		dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
		dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
		dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteConcentrations).DefaultCellStyle = dataGridViewCellStyle2;
		((System.Windows.Forms.Control)(object)this.dgvAnalyteConcentrations).Dock = System.Windows.Forms.DockStyle.Fill;
		((System.Windows.Forms.Control)(object)this.dgvAnalyteConcentrations).Location = new System.Drawing.Point(4, 4);
		((System.Windows.Forms.Control)(object)this.dgvAnalyteConcentrations).Margin = new System.Windows.Forms.Padding(4);
		this.dgvAnalyteConcentrations.MergeColumnHeaderBackColor = System.Drawing.SystemColors.Control;
		this.dgvAnalyteConcentrations.MergeColumnNames = (System.Collections.Generic.List<string>)resources.GetObject("dgvAnalyteConcentrations.MergeColumnNames");
		((System.Windows.Forms.Control)(object)this.dgvAnalyteConcentrations).Name = "dgvAnalyteConcentrations";
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteConcentrations).ReadOnly = true;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteConcentrations).RowHeadersWidth = 51;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteConcentrations).RowTemplate.Height = 23;
		((System.Windows.Forms.Control)(object)this.dgvAnalyteConcentrations).Size = new System.Drawing.Size(1080, 578);
		((System.Windows.Forms.Control)(object)this.dgvAnalyteConcentrations).TabIndex = 3;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteConcentrations).CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(dgvAnalyteConcentrations_CellFormatting);
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteConcentrations).CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(dgvAnalyteConcentrations_CellMouseDown);
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteConcentrations).RowPrePaint += new System.Windows.Forms.DataGridViewRowPrePaintEventHandler(dgvAnalyteConcentrations_RowPrePaint);
		((System.Windows.Forms.DataGridView)(object)this.dgvUncorrectedICPS).AllowUserToAddRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvUncorrectedICPS).AllowUserToDeleteRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvUncorrectedICPS).AllowUserToResizeRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvUncorrectedICPS).BackgroundColor = System.Drawing.SystemColors.Window;
		dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
		dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
		dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
		((System.Windows.Forms.DataGridView)(object)this.dgvUncorrectedICPS).ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
		((System.Windows.Forms.DataGridView)(object)this.dgvUncorrectedICPS).ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
		dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window;
		dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText;
		dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
		((System.Windows.Forms.DataGridView)(object)this.dgvUncorrectedICPS).DefaultCellStyle = dataGridViewCellStyle4;
		((System.Windows.Forms.Control)(object)this.dgvUncorrectedICPS).Dock = System.Windows.Forms.DockStyle.Fill;
		((System.Windows.Forms.Control)(object)this.dgvUncorrectedICPS).Location = new System.Drawing.Point(4, 4);
		((System.Windows.Forms.Control)(object)this.dgvUncorrectedICPS).Margin = new System.Windows.Forms.Padding(4);
		this.dgvUncorrectedICPS.MergeColumnHeaderBackColor = System.Drawing.SystemColors.Control;
		this.dgvUncorrectedICPS.MergeColumnNames = (System.Collections.Generic.List<string>)resources.GetObject("dgvUncorrectedICPS.MergeColumnNames");
		((System.Windows.Forms.Control)(object)this.dgvUncorrectedICPS).Name = "dgvUncorrectedICPS";
		((System.Windows.Forms.DataGridView)(object)this.dgvUncorrectedICPS).ReadOnly = true;
		((System.Windows.Forms.DataGridView)(object)this.dgvUncorrectedICPS).RowHeadersWidth = 51;
		((System.Windows.Forms.DataGridView)(object)this.dgvUncorrectedICPS).RowTemplate.Height = 23;
		((System.Windows.Forms.Control)(object)this.dgvUncorrectedICPS).Size = new System.Drawing.Size(1080, 574);
		((System.Windows.Forms.Control)(object)this.dgvUncorrectedICPS).TabIndex = 2;
		((System.Windows.Forms.DataGridView)(object)this.dgvUncorrectedICPS).CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(dgvUncorrectedICPS_CellFormatting);
		((System.Windows.Forms.DataGridView)(object)this.dgvUncorrectedICPS).CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(dgvUncorrectedICPS_CellMouseDown);
		((System.Windows.Forms.DataGridView)(object)this.dgvUncorrectedICPS).RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(dgvUncorrectedICPS_RowPostPaint);
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteICPS).AllowUserToAddRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteICPS).AllowUserToDeleteRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteICPS).AllowUserToResizeRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteICPS).BackgroundColor = System.Drawing.SystemColors.Window;
		dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
		dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
		dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteICPS).ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteICPS).ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
		dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window;
		dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText;
		dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteICPS).DefaultCellStyle = dataGridViewCellStyle6;
		((System.Windows.Forms.Control)(object)this.dgvAnalyteICPS).Dock = System.Windows.Forms.DockStyle.Fill;
		((System.Windows.Forms.Control)(object)this.dgvAnalyteICPS).Location = new System.Drawing.Point(4, 4);
		((System.Windows.Forms.Control)(object)this.dgvAnalyteICPS).Margin = new System.Windows.Forms.Padding(4);
		this.dgvAnalyteICPS.MergeColumnHeaderBackColor = System.Drawing.SystemColors.Control;
		this.dgvAnalyteICPS.MergeColumnNames = (System.Collections.Generic.List<string>)resources.GetObject("dgvAnalyteICPS.MergeColumnNames");
		((System.Windows.Forms.Control)(object)this.dgvAnalyteICPS).Name = "dgvAnalyteICPS";
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteICPS).ReadOnly = true;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteICPS).RowHeadersWidth = 51;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteICPS).RowTemplate.Height = 23;
		((System.Windows.Forms.Control)(object)this.dgvAnalyteICPS).Size = new System.Drawing.Size(1080, 574);
		((System.Windows.Forms.Control)(object)this.dgvAnalyteICPS).TabIndex = 3;
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteICPS).CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(dgvAnalyteICPS_CellFormatting);
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteICPS).CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(dgvAnalyteICPS_CellMouseDown);
		((System.Windows.Forms.DataGridView)(object)this.dgvAnalyteICPS).RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(dgvAnalyteICPS_RowPostPaint);
		((System.Windows.Forms.DataGridView)(object)this.dgvRatio).AllowUserToAddRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvRatio).AllowUserToDeleteRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvRatio).AllowUserToResizeRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvRatio).BackgroundColor = System.Drawing.SystemColors.Window;
		dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
		dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
		dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
		((System.Windows.Forms.DataGridView)(object)this.dgvRatio).ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
		((System.Windows.Forms.DataGridView)(object)this.dgvRatio).ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
		dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window;
		dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText;
		dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
		((System.Windows.Forms.DataGridView)(object)this.dgvRatio).DefaultCellStyle = dataGridViewCellStyle8;
		((System.Windows.Forms.Control)(object)this.dgvRatio).Dock = System.Windows.Forms.DockStyle.Fill;
		((System.Windows.Forms.Control)(object)this.dgvRatio).Location = new System.Drawing.Point(0, 0);
		((System.Windows.Forms.Control)(object)this.dgvRatio).Margin = new System.Windows.Forms.Padding(4);
		this.dgvRatio.MergeColumnHeaderBackColor = System.Drawing.SystemColors.Control;
		this.dgvRatio.MergeColumnNames = (System.Collections.Generic.List<string>)resources.GetObject("dgvRatio.MergeColumnNames");
		((System.Windows.Forms.Control)(object)this.dgvRatio).Name = "dgvRatio";
		((System.Windows.Forms.DataGridView)(object)this.dgvRatio).ReadOnly = true;
		((System.Windows.Forms.DataGridView)(object)this.dgvRatio).RowHeadersWidth = 51;
		((System.Windows.Forms.DataGridView)(object)this.dgvRatio).RowTemplate.Height = 23;
		((System.Windows.Forms.Control)(object)this.dgvRatio).Size = new System.Drawing.Size(1088, 582);
		((System.Windows.Forms.Control)(object)this.dgvRatio).TabIndex = 4;
		((System.Windows.Forms.DataGridView)(object)this.dgvRatio).CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(dgvRatio_CellFormatting);
		((System.Windows.Forms.DataGridView)(object)this.dgvRatio).RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(dgvRatio_RowPostPaint);
		this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
		this.dataGridViewTextBoxColumn1.DataPropertyName = "sample";
		this.dataGridViewTextBoxColumn1.Frozen = true;
		this.dataGridViewTextBoxColumn1.HeaderText = "样品名称/分析时间";
		this.dataGridViewTextBoxColumn1.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
		this.dataGridViewTextBoxColumn1.ReadOnly = true;
		this.dataGridViewTextBoxColumn1.Width = 160;
		this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
		this.dataGridViewTextBoxColumn2.DataPropertyName = "sample";
		this.dataGridViewTextBoxColumn2.Frozen = true;
		this.dataGridViewTextBoxColumn2.HeaderText = "样品名称/分析时间";
		this.dataGridViewTextBoxColumn2.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
		this.dataGridViewTextBoxColumn2.ReadOnly = true;
		this.dataGridViewTextBoxColumn2.Width = 160;
		this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
		this.dataGridViewTextBoxColumn3.DataPropertyName = "sample";
		this.dataGridViewTextBoxColumn3.Frozen = true;
		this.dataGridViewTextBoxColumn3.HeaderText = "样品名称/分析时间";
		this.dataGridViewTextBoxColumn3.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
		this.dataGridViewTextBoxColumn3.ReadOnly = true;
		this.dataGridViewTextBoxColumn3.Width = 160;
		this.dataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
		this.dataGridViewTextBoxColumn4.DataPropertyName = "sample";
		this.dataGridViewTextBoxColumn4.HeaderText = "样品名称/分析时间";
		this.dataGridViewTextBoxColumn4.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
		this.dataGridViewTextBoxColumn4.ReadOnly = true;
		this.dataGridViewTextBoxColumn4.Width = 160;
		base.AutoScaleDimensions = new System.Drawing.SizeF(8f, 15f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(1096, 642);
		base.Controls.Add(this.tabNumeric);
		base.Controls.Add(this.toolStrip1);
		base.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
		base.Name = "FormNumerics";
		base.ShowIcon = false;
		this.Text = "FormNumerics";
		base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(FormNumerics_FormClosing);
		base.Load += new System.EventHandler(FormNumerics_Load);
		this.tabNumeric.ResumeLayout(false);
		this.pageAnalyteConcentration.ResumeLayout(false);
		this.pageUncorrectICPS.ResumeLayout(false);
		this.pageAnalyteICPS.ResumeLayout(false);
		this.pageRatio.ResumeLayout(false);
		this.toolStrip1.ResumeLayout(false);
		this.toolStrip1.PerformLayout();
		((System.ComponentModel.ISupportInitialize)this.dgvAnalyteConcentrations).EndInit();
		((System.ComponentModel.ISupportInitialize)this.dgvUncorrectedICPS).EndInit();
		((System.ComponentModel.ISupportInitialize)this.dgvAnalyteICPS).EndInit();
		((System.ComponentModel.ISupportInitialize)this.dgvRatio).EndInit();
		base.ResumeLayout(false);
		base.PerformLayout();
	}
}
